package javango.db;

public interface Page<T> {

	/**
	 * Returns true if a next page exists
	 * @return
	 */
	boolean getHasNext();

	/**
	 * Returns true if a previous page exists
	 * @return
	 */
	boolean getHasPrevious();

	/**
	 * Returns the total number of pages
	 * @return
	 */
	int getNumber();

	int getPreviousPageNumber();

	int getNextPageNumber();

	/**
	 * Returns the 1-based index of the first object on this page, relative to total objects found (hits).
	 * 
	 * @return
	 */
	int getStartIndex();

	/**
	 * Returns the 1-based index of the last object on this page, relative to total objects found (hits).
	 */
	int getEndIndex();
	
	Paginator<T> getPaginator();

}